package com.woniu.HisHospitalizationApiImpl;

import com.woniu.HisHospitalizationApi.HisOrderFormApi;
import com.woniu.dto.HisOrderFormDto;
import com.woniu.dto.PageDTO;
import com.woniu.exception.DIYException;
import com.woniu.mapper.HisOrderFormMapper;
import com.woniu.model.HisOrderForm;
import com.woniu.param.HisOrderFormAddParam;
import com.woniu.param.HisOrderFormParam;
import com.woniu.service.IHisOrderFormService;
import com.woniu.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class HisOrderFormApiImpl implements HisOrderFormApi {
    @Resource
    private HisOrderFormMapper hisOrderFormMapper;
    @Resource
    private IHisOrderFormService hisOrderFormService;

    @Override
    public Result<HisOrderFormDto> addHisOrderForm(HisOrderFormAddParam hisOrderFormAddParam) {
        return hisOrderFormService.addHisOrderForm(hisOrderFormAddParam);
    }

    @Override
    public Result<Boolean> deleteHisOrderForm(ArrayList<Integer> id) {
        return hisOrderFormService.deleteHisOrderForm(id);
    }

    @Override
    public Result<HisOrderFormDto> updateHisOrderForm(HisOrderFormParam hisOrderFormParam) {
       return hisOrderFormService.updateHisOrderForm(hisOrderFormParam);
    }

    @Override
    public Result<PageDTO<HisOrderFormDto>> getAllHisOrderForm() {
        return null;
    }

    @Override
    public Result<PageDTO<HisOrderFormDto>> getAllHisOrderFormBy(HisOrderFormParam hisOrderFormParam) {
        return hisOrderFormService.getAllHisOrderFormBy(hisOrderFormParam);
    }
}
